#!/bin/bash
if [ -d $1 ];then
{
a="$1"
B=$(date +%m%s)
tar -czvf ${B}.tar.gz "$a" >> /home/fengjian/message.txt 
echo "backup is successful!"
}
else 
echo "there is no directory"
fi
exit 0
